package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PowderMakingMapper;
import com.ruoyi.system.domain.PowderMaking;
import com.ruoyi.system.service.IPowderMakingService;

/**
 * 获取客户Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-27
 */
@Service
public class PowderMakingServiceImpl implements IPowderMakingService 
{
    @Autowired
    private PowderMakingMapper powderMakingMapper;

    /**
     * 查询获取客户
     * 
     * @param id 获取客户主键
     * @return 获取客户
     */
    @Override
    public PowderMaking selectPowderMakingById(Long id)
    {
        return powderMakingMapper.selectPowderMakingById(id);
    }

    /**
     * 查询获取客户列表
     * 
     * @param powderMaking 获取客户
     * @return 获取客户
     */
    @Override
    public List<PowderMaking> selectPowderMakingList(PowderMaking powderMaking)
    {
        return powderMakingMapper.selectPowderMakingList(powderMaking);
    }

    /**
     * 新增获取客户
     * 
     * @param powderMaking 获取客户
     * @return 结果
     */
    @Override
    public int insertPowderMaking(PowderMaking powderMaking)
    {
        powderMaking.setCreateTime(DateUtils.getNowDate());
        return powderMakingMapper.insertPowderMaking(powderMaking);
    }

    /**
     * 修改获取客户
     * 
     * @param powderMaking 获取客户
     * @return 结果
     */
    @Override
    public int updatePowderMaking(PowderMaking powderMaking)
    {
        powderMaking.setUpdateTime(DateUtils.getNowDate());
        return powderMakingMapper.updatePowderMaking(powderMaking);
    }

    /**
     * 批量删除获取客户
     * 
     * @param ids 需要删除的获取客户主键
     * @return 结果
     */
    @Override
    public int deletePowderMakingByIds(Long[] ids)
    {
        return powderMakingMapper.deletePowderMakingByIds(ids);
    }

    /**
     * 删除获取客户信息
     * 
     * @param id 获取客户主键
     * @return 结果
     */
    @Override
    public int deletePowderMakingById(Long id)
    {
        return powderMakingMapper.deletePowderMakingById(id);
    }
}
